package com.tannuo.dolphinnotedemo.sdk.device.wifi;

import android.content.Context;

import com.tannuo.dolphinnotedemo.sdk.device.CommandListener;
import com.tannuo.dolphinnotedemo.sdk.device.DeviceCanvas;
import com.tannuo.dolphinnotedemo.sdk.device.DeviceListener;
import com.tannuo.dolphinnotedemo.sdk.device.TouchPointListener;
import com.tannuo.dolphinnotedemo.sdk.device.DeviceScreen;
import com.tannuo.dolphinnotedemo.sdk.device.protocol.IProtocol;
import com.tannuo.dolphinnotedemo.sdk.device.protocol.ProtocolHandler;

import java.util.UUID;

/**
 * Created by hucn on 2016/7/29.
 * Description: 白板设备
 */
public class WifiDevice extends WifiDeviceBase {
    // Unique UUID for this application
    private static final UUID SPP_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");

    private UUID mSpp_Uuid = SPP_UUID;
    private int mState;

    private DeviceListener mDeviceListener;
    private TouchPointListener mTouchPointListener;
    private CommandListener mCommandListener;

    private WifiDevice(Context context, IProtocol protocol) {
        if (null == context || protocol == null) {
            throw new IllegalArgumentException("DeviceBase construct failed");
        }
        mContext = context;
        mProtocol = protocol;
        mWifiService = new WifiService(context);
        mDeviceCanvas = new DeviceCanvas(600, 2000);
        mDeviceScreen = new DeviceScreen();

        mProtocolHandler = new ProtocolHandler(mProtocol, mWifiService, mDeviceCanvas, mDeviceScreen);
    }

    private void setDeviceListener(DeviceListener listener) {
        mDeviceListener = listener;
    }

    private void setTouchPointListener(TouchPointListener listener) {
        mTouchPointListener = listener;
    }

    private void setCommandListener(CommandListener listener) {
        mCommandListener = listener;
    }


    @Override
    public int connect(String name) {
        return 0;
    }

    @Override
    public int disconnect() {
        return 0;
    }

    @Override
    public void write(byte[] data) {

    }

    @Override
    public void capture() {

    }

    @Override
    public void record() {

    }
}
